<!DOCTYPE html>
<html lang="en">

{include file='index/header'}

<body id="reward" class="flexv">
<div id="common-header" class="flex">
    <a href="{:url('User/index')}" class=" cBtn back"><i class="iconfont icon-back"></i></a>
    <h1>推广奖励</h1>
    <a href="{:url('exchange/index')}" class="cBtn exchange"><span>兑换</span></a>
</div>
<div class="flexitemv scroll main">
    <div class="flex details">
        <div class="flexitemv centerv part">
            <p class="a">{$tz_integral}</p>
            <p class="b">付费套装推广奖励</p>
            <p class="c">{eq name='Think.session.utype' value='2'}60{else /}18{/eq} 积分 / 套</p>
            <a href="{:url('extenList',['status'=>1])}" class="d">查看记录 ></a>
        </div>
        <div class="flexitemv centerv part">
            <p class="a">{eq name='Think.session.utype' value='2'}{$mf_integral}{else /}0{/eq}</p>
            <p class="b">免费领取推广奖励</p>
            <p class="c">1 积分 / 套</p>
            <a href="{:url('extenList',['status'=>2])}" class="d">查看记录 ></a>
        </div>
    </div>
    <div class="flex centerh switch-btn">
        <div class="flex">
            <p class="flex center tab-btn active" data-index="0">推广链接</p>
            <p class="flex center tab-btn" data-index="1">推广二维码</p>
        </div>
    </div>
    <div class="show">
        <div class="show-item on">
            <p class="url">http://www.shiye8.cn/?pid={$Think.session.userid}</p>
            <div class="flex centerh operation">
                <a href="javascript:;" class="flex center clip" data-text="http://www.shiye8.cn/?pid={$Think.session.userid}">复制链接</a>
                <a href="{:url('Index/index',['pid'=>$Think.session.userid])}" class="flex center">进入页面分享</a>
            </div>
        </div>
        <div class="show-item">
            <div class="flex centerh img">
                <img src="http://b.bshare.cn/barCode?site=weixin&url=http://www.shiye8.cn/?pid={$Think.session.userid}" alt="">
            </div>
            <p class="intro">微信中长按二维码可保存</p>
        </div>
    </div>
    <div class="tips">
        <h2>推广积分如何使用？</h2>
        <p>推广积分可兑换等额现金，也可以在购买产品时作为等额现金消费</p>
        <h2>如何推广？</h2>
        <p>
            系统提供两种推广方式，链接形式：你可以复制链接发送给您的伙伴，也可以进入链接页面通过微信分享给您的伙伴。二维码形态：微信中长按保存二维码
            <a href="{:url('Extension/introduce')}" style="color:blue;">详细推广介绍</a>
        </p>
    </div>
</div>
{js href="http://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"}
{js href="http://cdn.bootcss.com/clipboard.js/1.6.1/clipboard.min.js"}
{js href='__ROOT__/public/static/js/functions.js'}
<script>
    var switchBtn = $('.switch-btn').find('p'),
        showItem = $('.show-item');
    switchBtn.click(function () {
        $(this).addClass('active').siblings().removeClass('active');
        showItem.removeClass('on');
        for (var i = 0; i < showItem.length; i++) {
           if (i == $(this).attr('data-index')) {
               showItem.eq(i).addClass('on');
           }
        }
    });
    var clipBoard = new Clipboard('.clip', {
        text: function (trigger) {
            return trigger.getAttribute('data-text');
        }
    });
    clipBoard.on('success', function (e) {
        showMsg('复制成功',1);
    });
    clipBoard.on('error', function(e) {
        showMsg('复制失败');
    });
</script>
{include file='index/footer'}
</body>
</html>